#include <bits/stdc++.h>
using namespace std;

#define ONLINE_JUDGE

#ifndef ONLINE_JUDGE
#define dbg(x...) { cerr << "\033[32;1m" << #x << " -> "; err(x); }
void err() { cerr << "\033[39;0m" << endl; }
template<typename T, typename... A>
void err(T a, A... x) { cerr << a << ' '; err(x...); }
#else
#define dbg(...)
#endif

typedef long long LL;

int t;
const int N = 3005;
char s[N];

int n;

int main(int argc, char const *argv[])
{
	scanf("%d", &t);
	for (int kk=0; kk<t; ++kk)
	{
		scanf("%d%s", &n, s);
		vector<int> l;
		for (int i=0; i<n; ++i)
		{
			if ((s[i] - '0') & 1)
				l.push_back(s[i] - '0');
		}
		if (l.size() < 2)
			puts("-1");
		else printf("%d%d\n", l[0], l[1]);
	}
	return 0;
}